<!DOCTYPE html>
<html lang="zh-cn">
<head>
<include file="Widget/head" />
<link rel="stylesheet" type="text/css" href="__CSS__/Home/defaut.css">
<link rel="stylesheet" type="text/css" href="__CSS__/Home/distance.css">
<link rel="stylesheet" type="text/css" href="__CSS__/Home/button.css">
<link rel="stylesheet" type="text/css" href="__CSS__/Home/font.css">
<link href="__CSS__/Home/global.css" rel="stylesheet" type="text/css">
<link href="__CSS__/Home/member.css" rel="stylesheet" type="text/css">
<script src="__JS__/Home/hm.js"></script>
</head>
<body>
{:W('Page/menu')}
{:W('Page/shanginfo')}

<div class="contt">        
    <div class="halltop">
    	<div class="hallr">
        	<ul>
            	<li><a href="{:U('Shang/lists')}" class="lsitico">任务大厅</a></li>
                <li><a href="{:U('Shang/mylists?flag=mylists')}" class="lsitico3">我的任务</a></li>
            </ul>
        </div>
        <div class="clr"></div>
	</div>
	
    <div class="hallrtr">
    	<div class="totask_ttr">
        	<div class="totip" style="font-size: 22px; font-weight: bold;">尊敬的商家朋友您好！为了保障商家利益，杜绝混在刷手中的骗子恶意退款给商家和平台造成损失，平台强烈要求商家给刷手返款之前要求刷手删除淘宝订单（QQ远程查看），以完全消除骗子退款的可能。<span style="font-size: 16px; font-weight: 500;">（若商家没有要求删除淘宝订单造成骗子恶意退款造成的损失，平台今后不予赔付。）</span></div>
            <div class="totrdiv">
            
	            <form id="xzmb" method="post">   
		            <table width="100%" border="0" cellspacing="0" cellpadding="0">
	    	            <tbody>
	    	            	<tr>
	                            <td width="11%"><label for="rwmoban">选择任务模板：</label></td>
	                            <td width="89%" class="tckbox">
	                                <select id="rwmoban" onchange="getTpl(this);" style="width: 200px; height: 22px" class="wenbk">
	                                    <option selected="selected" value="0">请选择模板。。。</option>
										<!-- <foreach name="list" item="vo"> -->
											<!-- <if condition="$vo['id'] eq $info['id']"> -->
		                                    	<option value="{$vo['id']}" selected="selected">{$vo['moban']}</option>
											<!-- <else/> -->
												<option value="{$vo['id']}">{$vo['moban']}</option>
											<!-- </if> -->
										<!-- </foreach> -->
	                                </select>&nbsp;<a href="{:U('Shang/moban')}">模板管理</a>
	                            </td>
	                        </tr>
	                    <tbody>    
	               </table>    
	             </form>     
             
	            <form id="taskAddForm" name="taskAddForm" action="{:U('Shang/fabu')}" method="post" enctype="multipart/form-data">     
	             	<table width="100%" border="0" cellspacing="0" cellpadding="0">
	             		<tbody>    
	                	<tr>
	                    	<td class="custom"><label for="psxy">类型：</label></td>
	                        <td class="custom">
	                        	<span class="custom-radio checked" id="rwtypeselect1">
	                            	<label class="mR15"><input class="j_auto_check" name="pm" type="radio" value="1" checked="checked">电脑</label>
	                            </span>  
	                            <span class="custom-radio" id="rwtypeselect2">
	                            	<label class="mR15"><input class="j_auto_check" name="pm" type="radio" value="2">手机</label>
	                            </span>                                              
							</td>
	                    </tr>
	                    <tr>
	                    	<td class="custom"><label for="psxy">任务类型：</label></td>
	                        <td class="custom">
	                        	<span class="custom-radio checked" id="rwtypeselect1">
	                            	<label class="mR15"><input class="j_auto_check" name="cate" type="radio" value="1" checked="checked">垫付单</label>
	                            </span>  
	                            <span class="custom-radio" id="rwtypeselect2">
	                            	<label class="mR15"><input class="j_auto_check" name="cate" type="radio" value="2">立返单</label>
	                            </span>   
	                            <span class="custom-radio" id="rwtypeselect3">
	                                <label class="mR15"><input class="j_auto_check" name="cate" type="radio" value="3">远程单</label>
	                            </span>   
	                            <span class="custom-radio" id="rwtypeselect4">
	                                <label class="mR15"><input class="j_auto_check" name="cate" type="radio" value="4">浏览单</label>
	                            </span>                                           
							</td>
	                    </tr>        
	                    <tr>
	                        <td width="11%"><label for="rwmoban">选择任务店铺：</label></td>
	                        <td width="89%" class="tckbox">
	                            <select id="rwmoban"  style="width: 200px; height: 22px" class="wenbk" name="dianpu">
	                                <option selected="selected" value="0">请选择模板。。。</option>
								<!-- <foreach name="dianpu" item="vo"> -->
	                                 	<option value="{$vo['name']}" selected="selected">{$vo['name']}</option>
								<!-- </foreach> -->
	                             </select>
	                         </td>
	                    </tr>               
	                    <tr>
	                    	<td><label for="sumMoney" id="sumoneyyongjinmsg"> 任务总价：</label></td>
	                        <td class="tckbox"><input name="price" id="sumMoney" type="text" class="required" value="{$info['price']}"><span id="sumoneyyongjinmsg1">（商品+物流）总价格 </span><strong class="high"> *</strong>注意：订单超过100元最低佣金10元。</td>
	                    </tr>
						<tr>
	                        <td><label for="yongjin"> 任务佣金：</label></td>
	                        <td class="tckbox"><input name="yj" type="text" class="required" id="yongjin" value="{$info['yongjin']}"><span></span><strong class="high"> *</strong></td>
	                    </tr>
	                    <tr>
	                        <td><label for="fbNum">发布数量：</label></td>
	                        <td class="tckbox"><input name="number" type="text" class="required" id="fbNum" value="{$info['number']}"><span></span><strong class="high"> *</strong></td>
	                    </tr>
	                    <tr>
	                        <td style="color: #222; font-size: 14px" align="right" width="148"><span style="color: #F00">*</span> 商品位置截图：</td>
	                        <td style="color: #222; font-size: 14px" width="781">
	                    	    <div id="flink1_div" class="zbaobei">
	                        	    <div style="height: 40px; margin-top: 2px;">
	                            	    <div style="height: 36px; width: 95px; float: left">
	                                	    <div class="btn btn1">
	                                    	    <span id="s_photourl">选择图片</span>
	                                            <input id="touxiang" name="thumb" type="file" accept="image/jpeg,image/x-png,image/gif">
	                                        </div>
	                                    </div>
	                                    <span style="color: #fe5500; font-weight: bold;"></span>
	                                </div>
	                                <div id="showimg_photourl"><img src="" onerror="this.src='__IMG__/renwuzhutu.jpg';" id="tx" style="height: 369px; width: 200px;"></div><div>
	                                	<table>
	                                		<tbody>
	                                        	<tr>
	                                                <td>商品一验证地址：</td>
	                                                <td><input type="text" id="spyanurldizhi" name="url" style="width: 500px;" placeholder="http://" class="required" value="{$info['url']}"><strong class="high"> *</strong></td>
	                                            </tr>
	                                            <tr>
	                                                <td>商品一关键字：</td>
	                                                <td><input type="text" id="rwkeys" name="keywords" style="width: 200px;" class="required" value="{$info['keywords']}"><strong class="high"> *</strong></td>
	                                            </tr>
	                                        </tbody>
	                                    </table>
	                                </div>
	                           </div>
	                        </td>
	                    </tr>
	                    <tr>
	                        <td>任务详细要求：</td>
	                        <td><textarea id="rwyq" name="content" placeholder="" style="width: 500px; height: 100px;padding: 5px; font-size: 14px; line-height: 20px; color: #333;">{$info['content']}</textarea></td>
	                    </tr>
	                    </tbody>
					</table>
	                <table class="sstiaojian">
	                	<tbody>
	                		<tr>
	                            <td><label for="psxy">刷手信用：</label></td>
	                            <td>
	                                <label class="mR15"><input class="j_auto_check" name="xinyong" type="radio" checked="checked" value="0">白号</label>
	                                <label class="mR15"><input class="j_auto_check" name="xinyong" type="radio" value="1">1心</label>
	                                <label class="mR15"><input class="j_auto_check" name="xinyong" type="radio" value="2">2心</label>
	                                <label class="mR15"><input class="j_auto_check" name="xinyong" type="radio" value="3">3心</label>
	                                <label class="mR15"><input class="j_auto_check" name="xinyong" type="radio" value="4">4心</label>
	                                <label class="mR15"><input class="j_auto_check" name="xinyong" type="radio" value="5">5心</label>
	                                <label class="mR15"><input class="j_auto_check" name="xinyong" type="radio" value="6">1钻以上</label>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td><label for="hbNum"> 货比数量：</label></td>
	                            <td>
	                                <label class="mR15"><input class="j_auto_check" name="huobi" checked="checked" type="radio" value="3">3家</label>
	                                <label class="mR15"><input class="j_auto_check" name="huobi" type="radio" value="5">5家</label>
	                                <label class="mR15"><input class="j_auto_check" name="huobi" type="radio" value="7">7家</label>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td><label for="mgseetime">主宝贝浏览：</label></td>
	                            <td>
	                            	<label class="mR15"><input checked="checked" name="zliulan" type="radio" value="5">5分钟</label>
	                                <label class="mR15"><input name="zliulan" type="radio" value="10">10分钟</label>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td><label for="isbuysc">双收藏：</label></td>
	                            <td>
	                                <input class="j_auto_check" type="checkbox" value="1"  checked="checked" name="shoucang" id="isbuysc"><span>收藏店铺并收藏主宝贝</span>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td><label for="iswangwang">假聊：</label></td>
	                            <td>
		                                <input type="checkbox" value="1" name="liao" id="iswangwang" checked="checked">
		                                <span>购买前假聊</span>&nbsp;&nbsp;&nbsp;
		                                <input type="checkbox" value="2" name="liao" id="shwangwang">
		                                <span>收货后假聊</span> 
	                            </td>
	                        </tr>
	                        <tr>
	                            <td><label for="pingfen">五星截图：</label></td>
	                            <td>
	                                	<label class="mR15"><input checked="checked" name="xing" type="radio" value="1">全部打5分</label>
	                                	<label class="mR15"><input name="xing" type="radio" value="2">全部不打分</label>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td><label for="iscomments">评论内容：</label></td>
	                            <td>
	                                <input class="j_toggle" name="ping" id="iscomments" value="1" type="checkbox">
	                                <span>必须填写规定内容</span>
	                                <div id="attr-info" class="d-hidden">
	                                    <textarea placeholder="此处填写您希望接手人对您的任务商品的评语内容，例如：&quot;掌柜妹妹很热情，发货速度很快，商品拿到了,感觉比图片上还要漂亮&quot;。请不要填写&quot;请带字好评&quot;等引导的文字" name="pingcon" id="comments" class="textarea mt10" style="height: 70px; width: 600px;"></textarea>
	                                </div>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td><label for="pingfen">平台：</label></td>
	                            <td>
	                                	<label class="mR15"><input checked="checked" name="pingtai" type="radio" value="1">淘宝</label>
	                                	<label class="mR15"><input name="pingtai" type="radio" value="2">天猫</label>
	                            </td>
	                        </tr>
	                    </tbody>
	                </table>
	                <table class="ssmoban">
	                	<tbody>
	                		<tr>
	                            <td>
	                                <label for="isbaocunmoban">保存模板：</label>
	                            </td>
	                            <td>
	                                <label class="mR15"><input checked="checked" name="isbaocunmoban" type="radio" value="0">否</label>
	                                <label class="mR15"><input name="isbaocunmoban" type="radio" value="1">是</label>
	                                <label>模板名称：</label>
	                                <input name="moban" id="mbname" style="width: 200px; font-size: 12px; font-weight: bold;color: #F00; height: 22px" type="text">
	                            </td>
	                        </tr>
	                    </tbody>
	                </table>
				</form>    
				 
	            <div class="f16px color-tips color-tips-green">
	            	最终每单佣金为：<span id="allprice" style="color: #666699;" class=" fB">0</span>
	            	<br> 一共要扣除你：<span id="descprice" style="color: #666699;" class=" fB">(1+0+0)*0=0</span>
	            </div>
	            
	            <div class="clearfix mT20">
	            	<button id="taskSubmitBtn" type="button" class="gwyy_btn gwyy_btn_green" onclick="checkform();">立即发布</button>
	            	<span class="mL10 c-999" id="fabumsg">每发一单平台收取服务费1！</span>
	            </div>
	            
			</div>
		</div>
	</div>
	
</div>
   
{:W('Page/foot')}
<script>
function checkform(){
	if($("#sumMoney").val() == ""){
		alert("请输入任务总价！");return false;
	}if($("#yongjin").val() == ""){
		alert("请输入任务佣金！");return false;
	}if($("#fbNum").val() == ""){
		alert("请输入发布数量！");return false;
	}if($("#spyanurldizhi").val() == ""){
		alert("请输入商品验证地址！");return false;
	}if($("#rwkeys").val() == ""){
		alert("请输入商品关键字！");return false;
	}jiesuanmoney();
	$("#taskAddForm").submit();
}
function getTpl($moban){
	$mbid = $($moban).val();
	window.location.href="Home-Shang-fabu-mbid-"+$mbid+".html";
}
//任务类型选中状态
$(function(){
	$(".custom-radio").click(function(){
		$n = $(this).index();
		$(".custom-radio").removeClass("checked");
		$(".j_auto_check").removeAttr("checked");
		$(this).addClass("checked");
		$(".j_auto_check:eq("+$n+")").attr("checked","checked");
	})
})
//类型选中状态
$(function(){
	$(".custom-radio").click(function(){
		$n = $(this).index();
		$(".custom-radio").removeClass("checked");
		$(".j_auto_check").removeAttr("checked");
		$(this).addClass("checked");
		$(".j_auto_check:eq("+$n+")").attr("checked","checked");
	})
})

//上传图片预览
$("#touxiang").change(function(){
	var objUrl = getObjectURL(this.files[0]) ;
	console.log("objUrl = "+objUrl) ;
	if (objUrl) {
		$("#tx").attr("src", objUrl) ;
	}
}) ;
//建立一個可存取到該file的url
function getObjectURL(file) {
	var url = null ; 
	if (window.createObjectURL!=undefined) { // basic
		url = window.createObjectURL(file) ;
	} else if (window.URL!=undefined) { // mozilla(firefox)
		url = window.URL.createObjectURL(file) ;
	} else if (window.webkitURL!=undefined) { // webkit or chrome
		url = window.webkitURL.createObjectURL(file) ;
	}
	return url ;
}
/************************************************/
$("#sumMoney").blur(function () {	jiesuanmoney();	});
$("#yongjin").blur(function () {	jiesuanmoney();	});
$("#fbNum").blur(function () {	jiesuanmoney();	});
//评论
$("#iscomments").click(function(){
	if ($("#iscomments").get(0).checked) {
		$(".d-hidden").css("display","block");
	}else{
		$(".d-hidden").css("display","none");
	}
})
//计算扣除金额
function jiesuanmoney(){
	//任务总价
	if($("#sumMoney").val() == ""){
		var zongjia = 0;
	}else{
		var zongjia = parseInt($("#sumMoney").val());
	}
	//发布数量
	if($("#fbNum").val() == ""){
		var fabunum = 0;
	}else{
		var fabunum = parseInt($("#fbNum").val());
	}
	
	//发布数量
	if($("#yongjin").val() == ""){
		var yongjin = 0;
	}else{
		var yongjin = parseInt($("#yongjin").val());
	}

	//每单佣金
	$("#allprice").html(yongjin);
	//共扣除
	var kouchu = (1 + yongjin + zongjia) * fabunum;
	$("#descprice").html("(1 + "+yongjin+" + "+zongjia+") * "+fabunum+" = "+kouchu);
}
</script>
</body>
</html>    